<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <div id="app"></div>
    <template id="t1">
      <div>
        <template v-if="order===1">
          <h2>标题1</h2>
          <p>内容1</p>
        </template>
        <template v-else-if="order===3">
          <h2>标题2</h2>
          <p>内容2</p>
        </template>
        <template v-esle>
          <h2>标题...</h2>
          <p>内容...</p>
        </template>
      </div>
    </template>
    <script src="./vue.js"></script>
    <script>
      const vm = new Vue({
        el: "#app",
        template: "#t1",
        data: {
          order: 1,
        },
      });
    </script>
  </body>
</html>
